<script setup lang='ts'>
  import { computed } from 'vue'
  const props = defineProps({
    score:{
      type:Number,
      default:0
    }
  })
  const integral = computed(()=>props.score)
</script>

<template>
  <div class="integralUnit flex-align">
    <img src="@/assets/images/icon2.png" class="icon">
    <div>{{ integral }}</div>
  </div>
</template>

<style lang='scss' scoped>
  .integralUnit {
    position: relative;
    width: max-content;
    min-width: 58px;
    height: 16px;
    margin: 0 auto;
    padding: 0 8px 0 22px;
    box-sizing: border-box;
    background: #FFF9E8;
    border-radius: 100px;
    border: 1px solid #FFFFFF;
    .icon {
      position: absolute;
      top: 50%;
      left: -1px;
      transform: translateY(-50%);
      width: 18px;
      height: 18px;
    }
    div {
      flex: 1;
      color: #775134;
      font-size: 11px;
      font-weight: 500;
      text-align: center;
    }
  }
</style>